package com.hopu.dy.controller;

import com.hopu.dy.pojo.video;
import com.hopu.dy.service.IDyService;
import com.hopu.dy.service.ITitleService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("Biaoti")
public class BiaotiController {
    @Resource
    private IDyService dyService;

    @PostMapping
    public String insert(@RequestBody video video) {
        dyService.insert(video.getTitle(),video.getUrl());
        return "提交成功";
    }
}
